USE [BMIG_MENSUAL_POST_CADENA]

 -- creating the store procedure
IF EXISTS (SELECT name 
	   FROM   sysobjects 
	   WHERE  name = '[dbo].[WASP_M0006_DROP_TABLA]'
	   AND 	  type = 'P') 
	DROP PROCEDURE [dbo].[WASP_M0006_DROP_TABLA]
GO
CREATE PROCEDURE [dbo].[WASP_M0006_DROP_TABLA] AS
BEGIN
  if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[as_colocacion_mensual_temp]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  drop table [dbo].[as_colocacion_mensual_temp]
END